﻿@using hc.Plat.Common.Extend;
@using hc.epm.DataModel.Business;
@model Epm_Project
@{
    ViewBag.Title = "查看项目";
}
<style type="text/css">
    .tab .upload li {
        width: 100px;
    }

    .setbut {
        width: 120px !important;
    }

    .supportType {
        margin-left: 20px;
        color: #999999;
    }

    .selectbg {
        background: #ebebe5;
    }
</style>
<div class="contentData">
    <ul class="tab-list">
        <li id="Detail" class="active">基本信息</li>
        <li id="DetailApprovalConstitute">总批复构成</li>
        <li id="DetailProjectISP">工程供应商</li>
        <li id="DetailProjectMainPoint">工程要点</li>
        <li id="DetailTimeManage">工期管理</li>
        <li id="DetailMilestonePlan">工程节点</li>
        @*<li id="DetailProjectData">项目资料</li>*@
        <li id="ScheduleInfo">进度跟踪</li>
        <li id="VisaInfo">签证信息</li>
        <li id="QuestionInfo">问题信息</li>
        <li id="ChangeInfo">变更信息</li>
        @*<li id="ContractInfo">合同信息</li>*@
        <li id="DetailCrossingsManage">外部手续</li>
        <li id="video">视频集成</li>
    </ul>
    <div class="tab-view">
        <div class="tab" id="tab">
            <div class="long-text">
                <input type="hidden" id="State" name="State" />
                <label>&nbsp;项目编号&nbsp;:</label>
                <input type="text" id="Code" name="Code" value="@Model.Code" disabled />
                <input type="hidden" id="Id" name="Id" value="@Model.Id" />
            </div>
            <div class="long-text">
                <label>&nbsp;项目名称&nbsp;:</label>
                <input type="text" id="Name" name="Name" value="@Model.Name" disabled />
            </div>
            <div class="short-text">
                <label>&nbsp;项目性质&nbsp;:</label>
                <select id="ProjectNature" name="ProjectNature" disabled class="selectbg">
                    <option selected>@Model.ProjectNatureName</option>
                </select>
                <input type="hidden" id="ProjectNatureName" name="ProjectNatureName" value="@Model.ProjectNatureName" />
            </div>
            <div class="long-text garage">
                <label>&nbsp;工程主体&nbsp;:</label>
                <input type="text" id="ProjectSubjectName" name="ProjectSubjectName" value="@Model.ProjectSubjectName" readonly="readonly" autocomplete="off" disabled />
                <i class="pic iconfont" width="20" height="30" style="cursor:pointer; left:596px;">&#xe76a;</i>
            </div>
            <div class="region">
                <label>项目地区&nbsp;:</label>
                <select disabled class="selectbg" style="display:none;">
                    <option selected>@Model.Province</option>
                </select>
                <select disabled class="selectbg">
                    <option selected>@Model.City</option>
                </select>
                <select disabled class="selectbg">
                    <option style="display:none">@Model.Area</option>
                </select>
            </div>
            <div class="long-text">
                <label>&nbsp;项目地址&nbsp;:</label>
                <input type="text" id="Address" name="Address" value="@Model.Address" disabled />
            </div>
            <div class="long-text">
                <label style="margin-left: -68px;width: 188px;">&nbsp;投资概算（总批复金额）&nbsp;:</label>
                <input type="text" id="Amount" name="Amount" value="@Model.Amount.ToString("#0.######")" disabled /><span>&nbsp;万元</span>
            </div>
            <div class="long-text">
                <label>&nbsp;项目主题&nbsp;:</label>
                <input type="text" id="Description" name="Description" value="@Model.Description" disabled />
            </div>
            <div class="long-text">
                <label>&nbsp;项目经理&nbsp;:</label>
                <input type="text" id="PMName" name="PMName" value="@Model.PMName" readonly="readonly" autocomplete="off" disabled />
                <i class="pic iconfont" width="20" height="30" style="cursor:pointer; left:596px;">&#xe76a;</i>
            </div>
            <div class="long-text">
                <label>&nbsp;经理电话&nbsp;:</label>
                <input type="text" id="PMPhone" name="PMPhone" value="@Model.PMPhone" disabled />
            </div>
            <div class="long-text">
                <label>&nbsp;批复文号&nbsp;:</label>
                <input type="text" id="ReplyNumber" name="ReplyNumber" value="@Model.ReplyNumber" disabled />
            </div>
            <div class="long-text">
                <label>&nbsp;所属分公司&nbsp;:</label>
                <input type="text" id="CompanyName" name="CompanyName" value="@Model.CompanyName" readonly="readonly" autocomplete="off" disabled />
                <i class="pic iconfont" width="20" height="30" style="cursor:pointer; left:596px;">&#xe76a;</i>
            </div>
            <div class="long-text">
                <label>&nbsp;分公司负责人&nbsp;:</label>
                <input type="text" id="ContactUserName" name="ContactUserName" value="@Model.ContactUserName" readonly="readonly" autocomplete="off" disabled />
                <i class="pic iconfont" width="20" height="30" style="cursor:pointer; left:596px;">&#xe76a;</i>
            </div>
            <div class="long-text">
                <label>&nbsp;负责人电话&nbsp;:</label>
                <input type="text" id="ContactPhone" name="ContactPhone" value="@Model.ContactPhone" disabled />
            </div>
            <div class="short-text">
                <label><span class="star"></span>&nbsp;立项评审时间&nbsp;:</label>
                <input type="text" id="ReplyDate" name="ReplyDate" readonly="readonly" autocomplete="off" disabled value="@(Model.ReplyDate == null ? "" : Convert.ToDateTime(Model.ReplyDate).ToString("yyyy-MM-dd"))">
                <i class="pic iconfont" width="20" height="30" style="cursor:pointer">&#xe7e2;</i>
            </div>
            <div class="upload" style="margin-bottom:0px;">
                <div><label><span class="star"></span>&nbsp;评审资料&nbsp;:</label></div>
            </div>
            <div style="width:100%;" id="fileListFile">
                <ul class="fileShow"></ul>
                <input type="hidden" name="fileDataJsonFile" id="fileDataJsonFile">
            </div>
            @if (Model.ProjectNatureName == "新建站")
            {
                <div class="long-text">
                    <label><span class="star"></span>&nbsp;汽柴比&nbsp;:</label>
                    <input type="text" id="GasolineDieselRatio" name="GasolineDieselRatio" value="@Model.GasolineDieselRatio" readonly="readonly" disabled />
                </div>
            }
            <div class="long-text">
                <label>&nbsp;方案选择&nbsp;:</label>
                <input type="text" id="BluePrintValue" name="BluePrintValue" value="@Model.BluePrintValue" disabled />
            </div>
            <div class="intro">
                <div><label>&nbsp;工程内容&nbsp;:</label></div>
                <div>
                    <textarea class="sub-description" id="ProjectContent" name="ProjectContent" disabled>@Model.ProjectContent</textarea>
                </div>
            </div>
            <div class="intro">
                <div><label>&nbsp;备注&nbsp;:</label></div>
                <div>
                    <textarea class="sub-description" id="Remark" name="Remark" disabled>@Model.Remark</textarea>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        $("#Detail").click(function () {
            window.location.href = 'Detail?projectId=@ViewBag.ProjectId';
        });
        $("#DetailApprovalConstitute").click(function () {
            window.location.href = 'DetailApprovalConstitute?projectId=@ViewBag.ProjectId';
        });
        $("#DetailProjectMainPoint").click(function () {
            window.location.href = 'DetailProjectMainPoint?projectId=@ViewBag.ProjectId';
        });
        $("#DetailTimeManage").click(function () {
            window.location.href = 'CKTimeLimitDetail?projectId=@ViewBag.ProjectId';
        });
        $("#DetailMilestonePlan").click(function () {
            window.location.href = 'DetailMilestonePlan?projectId=@ViewBag.ProjectId';
        });
        $("#DetailProjectISP").click(function () {
            window.location.href = 'DetailProjectISP?projectId=@ViewBag.ProjectId';
        });
        $("#DetailProjectData").click(function () {
            window.location.href = 'DetailProjectData?projectId=@ViewBag.ProjectId';
        });
        $("#ScheduleInfo").click(function () {
            window.location.href = 'ScheduleInfo?projectId=@ViewBag.ProjectId';
        });
        @*$("#ContractInfo").click(function () {
            window.location.href = 'ContractInfo?projectId=@ViewBag.ProjectId';
        });*@
        $("#ChangeInfo").click(function () {
            window.location.href = 'ChangeInfo?projectId=@ViewBag.ProjectId';
        });
        $("#VisaInfo").click(function () {
            window.location.href = 'VisaInfo?projectId=@ViewBag.ProjectId';
        });
        $("#QuestionInfo").click(function () {
            window.location.href = 'QuestionInfo?projectId=@ViewBag.ProjectId';
        });
        $("#DetailCrossingsManage").click(function () {
            window.location.href = 'CKProcedureDetail?projectId=@ViewBag.ProjectId';
        });
        $("#video").click(function () {
            window.location.href = 'Video?projectId=@ViewBag.ProjectId';
        });
        $("#video").click(function () {
            window.location.href = 'Video?projectId=@ViewBag.ProjectId';
        });

        //获取附件
        $.post("/Files/GetFileList", { tableName: 'Epm_Project', id: '@ViewBag.ProjectId', tableCol: "ReplyDate" }, function (data) {
            if (data.Flag) {
                if (data.Data.length > 0) {
                    data.Data.forEach(function (item, index, arr) {
                        if (item.ImageType == null) {
                            var odiv = '<li id="' + item.GuidId + '">';
                            odiv += '<div class="downloadFile"><img src="' + getFileImg(item.Name) + '" style="width: 20px;height: 20px;cursor: pointer;" class="imgShow"/><a href="javascript:;" target="_blank">' + item.Name + '</a></div>';
                            odiv += '<div>' + item.Size + '</div>';
                            odiv += '<span style="margin-left:20px;">' + item.CreateUserName + '</span>';
                            odiv += '<span style="margin-left:20px;">' + new Date(formatDateByJson(item.CreateTime)).Format("yyyy-MM-dd") + '</span>';
                            odiv += '</li>';
                            $('#fileListFile .fileShow').append(odiv);
                        }
                    });
                }
            } else {
                parent.layer.alert(data.Message, { icon: 2 });
            }
        });

    });
</script>

